<?php

namespace app\index\controller;

use think\Controller;
use think\Db;

class TestDb extends Controller
{
    public function dataQuery ()
    {
        // $res = Db::query('select * from tp_test');
        $res = Db::table('tp_test')->where(['t_id'=> 3])->find();
        $sql = Db::getLastSql();
        dump($sql);die;
    }
}
